﻿@model IEnumerable<string>
<script language="javascript" type="text/javascript">
    function onPoliciesSelected(data) {
        $("#Policies").val(data.Object);
        $('#PoliciesDialog').dialog('close');
    }
</script>
@{
    AjaxOptions ajaxOpts = new AjaxOptions
    {
        HttpMethod = HttpVerbs.Post.ToString(),
        OnSuccess = "onPoliciesSelected"
    };
}
@using (Ajax.BeginForm(MVC.Reports.Filters.SavePolicies(), ajaxOpts))
{
    @Html.CheckBoxList("Policies",
                   x => Model,
                   x => x,
                   x => x,
                   x => new string[] { })
    <input type="submit" value="Submit" />
}